﻿@model N03_11HCA_HTTTHD.Models.LienHe
@{
    ViewBag.Title = "Liên hệ";
    Layout = "~/Views/Shared/_Layout.cshtml";
}


@section TimKiemImport{
    <form action="" id="search-form">                
        <fieldset>
        <input class="text" value="" />
        <input type="submit" value="Tìm kiếm" />
        </fieldset>
    </form>
}

@section JavaScriptCSSImport{
    <link href="@Url.Content("~/Content/mycontent/list_counter.css")" rel="stylesheet" type="text/css"/>
    <script type="text/javascript">
        function validateForm() {

            var NoiDung = document.forms["fLienHe"]["NoiDung"].value;
            if (NoiDung == null || NoiDung.length < 6) {
                thongBao("Nội dung phải trên 10 kí tự.");
                return false;
            }
            var EmailNguoiGoi = document.forms["fLienHe"]["Email"].value;
            if (EmailNguoiGoi == null || EmailNguoiGoi.length < 5) {
                thongBao("Email phải trên 5 kí tự.");
                return false;
            }
            
            return true;
        }

    </script>
}

@section MenuTraiImport{
    @Html.Action("MenuTraiCanBan", "Home");
    @Html.Action("MenuTraiTimMua", "Home");
}

@section MenuImport{
    <ul class="nav">
        <li><a href="/ChaoBan">Chào bán</a></li>
        <li><a href="/TimMua">Tìm mua</a></li>
        <li><a href="/DoanhNghiep">Doanh nghiệp</a></li>
        <li><a href="/TinTuc">Tin tức</a></li>
    </ul>
}

@section JavaScriptDocumentReady{
    
}

<h2>Gởi thông điệp liên hệ</h2>

<form name="fLienHe" action="/Home/LienHe" method="post" onsubmit="return validateForm();">
    <table class="rong100p">
    <tbody>
     <tr>
            <td colspan="2" id="thongBaoLoi">@if(Model.ChuoiThongBao!=null){@Model.ChuoiThongBao}</td>
            
        </tr>
        <tr>
            <td width="30%">Người nhận: </td>
            <td>
            <input type="hidden"  name="IDNguoiNhan" value="@Model.IDNguoiNhan" />
            <input class="rong100p" type="text" readonly="readonly" name="TenNguoiNhan" value="@Model.TenNguoiNhan" />
            </td>
        </tr>
        <tr>
            <td>Chủ đề</td>
            <td>
            <input  class="rong100p"type="text" readonly="readonly" name="ChuDe" value="@Model.ChuDe" />
            </td>
        </tr>
        <tr>
            <td>Nội dung</td>
            <td>
            <textarea  class="rong100p"cols="30" rows="5" name="NoiDung">@Model.NoiDung</textarea>
            </td>
        </tr>
        <tr>
            <td>Email người gởi:</td>
            <td>
            <input type="text" name="Email" value="@Model.Email" />
            </td>
        </tr>
        <tr>
            <td></td>
            <td>
             <input type="submit" value="Liên hệ" /><input type="reset" value="Xóa thông tin" />
            </td>
        </tr>
    </tbody>
    </table>
</form>